<template>
    <div>
        <input type="text" id="textInput">
        <div>
        <button @click="keepdirect()">直接保存</button>
        <button @click="keepdelay()">延时异步保存</button>
        </div>
    </div>
</template>

<script>


export default {
    name: 'TaskPart',
    methods: {

        keepdirect() {
            let num = document.getElementById('textInput').value
            this.$store.commit('keepingdirect', num)
        },
        keepdelay() {
            let num = document.getElementById('textInput').value
            this.$store.dispatch('keepingdelay', num)
        }
    }
}
</script>

